package com.guopaoedu.demo.mdcdemo;

import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@SpringBootApplication
public class MdcDemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(MdcDemoApplication.class, args);
    }

    @Component
    @Order(value = 1)
    public class MyStartupRunner2 implements CommandLineRunner {
        @Override
        public void run(String... args) throws Exception {
            System.out.println(">>>>>>>>>>>>>>>服务启动执行，执行加载数据等操作 MyStartupRunner2 order 1 <<<<<<<<<<<<<");
            SimpleMDC.main(args);
        }
    }

}
